< previous page page_446 next page >

Page 446
z0466-01.gif
Figure 13.24
Program Clip displaying eight cubes.
If you move the center of projection until it lies at the origin, the projection fails. You cannot perform a perspective projection when the center of projection lies within the plane of projection.
Composing Transformations
One of the main reasons for writing transformations as matrices is so that you can compose them to store complicated combinations of transformations in a single matrix. This allows you to build complex transformations as combinations of simpler ones. Many of these complex operations are similar to their two-dimensional equivalents.
Scaling Without Translation
When you scale an object in three dimensions, its X, Y, and Z coordinates are all scaled so that the object tends to move further from, or closer to, the origin. To scale an object without moving it, you can follow a procedure similar to the one described in Chapter 12, Two-Dimensional Transformations, for scaling an object in two dimensions.
First, translate the object to the origin. Next, scale the object. Then use the inverse of the initial translation to move the object back to its original position. Figure 13.25 shows a cube being translated to the origin, scaled, and translated back to its original position.

 
< previous page page_446 next page >